package com.sd.repay.task.utils;

import com.sd.repay.pojo.ScheduleJob;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * @author sd
 * @Description: 允许任务并发执行，区别于 QuartzJobFactoryDisallowConcurrentExecution
 * @date 2017年10月25日
 */
public class QuartzJobFactory implements Job {

    public void execute(JobExecutionContext context) throws JobExecutionException {
        ScheduleJob scheduleJob = (ScheduleJob) context.getMergedJobDataMap().get("scheduleJob");
        TaskUtils.invokMethod(scheduleJob);
    }
}